<?php

// config.php
// Michael Baker
// 2010.08.19
//
// configuration directives and other constants

define( 'WEB_ROOT', 'http://0.0.0.0/path/to/e2e' ); // path to e2e root, where status.php is
define( 'SITE_NAME', 'perfSONAR E2E' );             // name displayed on status page

/* Central database configuration */
define( 'DB_USERNAME', '' );
define( 'DB_PASSWORD', '' );
define( 'DB_DATABASE', 'PS_MDM' );
define( 'DB_HOST', '127.0.0.1' );

/* OWAMP database configuration */
define( 'QDB_USERNAME', 'readonly' );
define( 'QDB_PASSWORD', 'readonly' );
define( 'QDB_DATABASE', 'owamp' );
define( 'QDB_TESTSPEC', '' ); // put the relevant testspec ID here!

/* Other OWAMP database constants */
define( 'QDB_NTP_OFFSET', 2208988800 );
define( 'QDB_NTP_SCALE', pow( 2, 32 ) );
define( 'QDB_TBL_DATES', 'DATES' );
define( 'QDB_TBL_DATA', 'DATA' );
define( 'QDB_TBL_DELAY', 'DELAY' );
define( 'QDB_TBL_NODES', 'NODES' );
define( 'QDB_TBL_TESTSPEC', 'TESTSPEC' );
define( 'QDB_TBL_TTL', 'TTL' );

/* Miscellaneous constants */
define( 'QDB_MYSQL_PORT', 3306 );          // this is ONLY used for testing if nodes are alive
define( 'DEFAULT_MAPCOLOR', 'purple' );    // mapcolor assigned to new thresh brackets
define( 'INVALID_ID', 0 );                 // node ID defined as an invalid ID (no node should ever have this ID)
define( 'NC_TITLE_UNKNOWN', '(unknown)' ); // name to display for unknown thresh brackets
define( 'HAS_DB_AUTODETECT', -1 );         // "has_db" value used to cause autodetection

define( 'COLOR_NOTHRESH', -1 ); // thresholding bracket not found
define( 'COLOR_NOMATCH', -1 );  // fault numeric fails to match against threshold
define( 'COLOR_DEAD', -1 );     // nodecouple datasource is dead
define( 'COLOR_EMPTYARR', -1 ); // colorcode returned if get_worst_color(array()) is called
define( 'NUM_DEFAULT', -1 );    // default numeric (this will be shown if nothing is dead, but no data is present)

// socket timeout in milliseconds for checking whether a certain node is responding
// do not set this too low or nodes will be falsely considered dead
define( 'SOCK_TIMEOUT', 0.250 );

?>